package com.adpython.domain;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Unique;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @author wenhua.yang
 * @date 2009-7-9
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Users {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String mail;

	@Persistent
	private String password;

	@Persistent
	private Date createTime;
	
	@Persistent
	private Date updateTime;

	@Persistent
	private boolean isActive;
	
	@Persistent
	private boolean isValid;

	public Users(String mail, String password) {
		this.mail = mail;
		this.password = password;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public void setIsActive(boolean isActive) {
		this.isActive = isActive;
	}
	
	public void setIsValid(boolean isValid) {
		this.isValid = isValid;
	}

	public Long getId() {
		return this.id;
	}

	public String getMail() {
		return this.mail;
	}

	public String getPassword() {
		return this.password;
	}

	public Date getCreateTime() {
		return this.createTime;
	}
	
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public boolean getIsActive() {
		return this.isActive;
	}
	
	public boolean getIsValid() {
		return this.isValid;
	}
}
